<template>
  <div id="app">
    <v-header :seller="seller"></v-header>
    <div class="link">
      <router-link to="/goods">商品</router-link>
      <router-link to="/comment">评价</router-link>
      <router-link to="/business">商家</router-link>
    </div>
    <router-view :seller="seller"/>
  </div>
</template>

<script>
  import Header from './components/header/Header.vue'
export default {
  name: 'App',
  data(){
    return {
      seller: {}
    }
  },
  created(){
    this.$http.get('api/seller').then( result =>{
      if(result.body.status === 0){
        this.seller = result.body.message
      }
    })
  },
  components:{
    'v-header':Header
  }
}
</script>

<style lang="scss">

  *{
    margin: 0;
    padding: 0;
  }
  #app{
    overflow: hidden;
  }
  .link{
    display: flex;
    height: 40px;
    line-height: 40px;
    @include border-1px(rgba(7,17,27,.1));
    a{
      flex: 1;
      color: rgb(77,85,93);
      font-size: 14px;
      text-align: center;
      text-decoration: none;
    }
    .link-active{
      color: rgb(240,20,20);
    }
  }

</style>
